package com.example.book.adapter;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Hua YY
 * Date: 2024-12-20
 * Time: 10:07
 */
public class Log4jAdapter implements Slf4jLog{
    private Log4j log4j;
    public Log4jAdapter(Log4j log4j){
        this.log4j = log4j;
    }
//适配器，实现接口，Log4j通过适配器用上了接口中的方法
    @Override
    public void log(String message) {
        log4j.log4jPrint("我是适配器，打印日志为："+message);
    }

}
